package com.yl.auth.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 *
 * </p>
 *
 * @author ln
 * @since 2023-07-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "角色实体类")
public class Role implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 角色表
     */
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty("角色姓名")
    private String name;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    /**
     * 关联账号数
     */
    @TableField(exist = false)
    @ApiModelProperty("账号数")
    private Integer count;

    @ApiModelProperty("类型")
    private Integer type;
    @TableField
    @TableLogic
    @ApiModelProperty("软删除")
    private Integer isDelete;

    @ApiModelProperty("创建人")
    private String rolechuangjianren;
}
